package com.adingxiong.cft.controller.quartz;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * @ClassName TimeJob
 * @Description TODO
 * @Author xiongchao
 * @Date 2021/3/26 13:20
 **/
@Slf4j
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class TimeJob implements Job {
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("开始执行定时任务 ==========  {} ================",sdf.format(new Date()));
    }
}
